/*TMODJS:{"version":2,"md5":"54ff2c43aec093582e97a9148882ff64"}*/
template('survey_question_view',function($data,$id) {
var $helpers=this,$escape=$helpers.$escape,id=$data.id,picture=$data.picture,type=$data.type,selectmax=$data.selectmax,name=$data.name,description=$data.description,$each=$helpers.$each,options=$data.options,$value=$data.$value,$index=$data.$index,include=function(id,data){data=data||$data;var $text=$helpers.$include(id,data,$id);$out+=$text;return $text;},limit=$data.limit,tag=$data.tag,$out='';$out+='<div class="well question" id="question-view-';
$out+=$escape(id);
$out+='" data-id="';
$out+=$escape(id);
$out+='"> <div class="col-xs-12"> <div class="" style="margin-top: 10px;margin-bottom: 0px;"> <label>题目1</label> <span class="glyphicon glyphicon-picture" data-url=\'';
$out+=$escape(picture);
$out+='\'></span> ';
if(type == 1){
$out+='【单选】';
}
$out+=' ';
if(type == 2){
$out+='【多选】';
}
$out+=' ';
if(type == 3){
$out+='【输入】';
}
$out+=' ';
if(type == 2 && selectmax != 0){
$out+='【最多3项】';
}
$out+=' ';
$out+=$escape(name);
$out+=' <div class="btn-group pull-right"> <a class="btn btn-default btn-xs btn-question-edit">编辑</a> <a class="btn btn-default btn-xs btn-question-del">删除</a> </div> </div> <div style="margin-left:20px;"> <small>';
if(description == null){
$out+='没有描述';
}else{
$out+=$escape(description);
}
$out+='</small> ';
if(type == 1 || type == 2){
$out+=' <table> <tbody> ';
$each(options,function($value,$index){
$out+=' ';
include('./survey_option_view',$value);
$out+=' ';
});
$out+=' </tbody> </table> ';
}else{
$out+=' <div>限制条件:re<span>';
$out+=$escape(limit);
$out+='</span></div> ';
}
$out+=' <div class="tags"> ';
$each(tag.split(','),function($value,$index){
$out+=' ';
if($value){
$out+=' <span class="tag label label-primary">';
$out+=$escape($value);
$out+='</span>&nbsp;&nbsp; ';
}
$out+=' ';
});
$out+=' </div> </div> </div> </div>';
return new String($out);
});